//
//  SCBaseTableViewController.h
//  Shuaiche
//
//  Created by dangshuai on 2018/12/18.
//  Copyright © 2018 zzs. All rights reserved.
//

#import "SCBaseViewController.h"
//#import "SCCustomFailedTipView.h"

NS_ASSUME_NONNULL_BEGIN

@interface SCBaseTableViewController : SCBaseViewController<UITableViewDelegate,UITableViewDataSource>
@property (nonatomic, strong) UITableView *tableView;

@property (nonatomic, assign) int pageNo;
@property (nonatomic, assign) int pageSize;
@property (nonatomic, strong) NSMutableDictionary *params;
@property (nonatomic, strong) NSMutableArray *dataSource;

@property (nonatomic, strong) NSMutableArray *normalImages;
@property (nonatomic, strong) NSMutableArray *refreshImages;

@property (nonatomic, copy,nullable) NSString *buttonEventName;

@property (nonatomic, strong) UIView *noDataView;

- (void)registerCellWithNib:(NSString *)cellName;
- (void)registerCellClass:(Class)cls;

- (UITableViewStyle)tableViewStyle;
- (CGRect)tableViewFrame;
- (UIEdgeInsets)tableViewContentInsets;

- (void)addGifHeaderRefresh;
- (void)addGifHeaderAutoRefresh:(BOOL)refresh;
- (void)removeHeaderRefrehs;
- (void)addFooterRefresh;

- (void)reloadTableView;

- (void)autoRefresh;        // 自动下拉刷新
- (void)pullRequestData;    // 下拉刷新     >> 需要子类重写调用接口
- (void)loadMoreData;       // 上拉加载更多  >> 需要子类重写调用接口
- (void)noMoreData;
- (void)endRefresh;
- (void)endRefreshWithNoMoreData:(BOOL)noMore;

- (NSString *)emptyImageName;
- (NSString *)emptyTitleString;
- (NSString *)emptyTipString;
- (void)updateEmptyTipString:( NSString * _Nullable)tip;
- (void)updateEmptyButtonTitle:(NSString * _Nullable)title;

@end

NS_ASSUME_NONNULL_END
